package com.hiwhitley.easy.day07;

/**
 * Created by hiwhitley on 2016/8/11.
 */
public class ReverseString {
    public static String reverseString(String s) {
        char[] chars = s.toCharArray();
        int len = chars.length;
        char temp;
        for (int i = 0; i < len / 2; i++) {
            temp = chars[i];
            chars[i] = chars[len - 1 - i];
            chars[len - 1 - i] = temp;
        }
        return String.copyValueOf(chars);
    }

    public static void main(String[] args) {
        System.out.println(reverseString("a."));
    }
}
